package ocg.http.httpcore;

import java.util.Map;

public class Get extends HttpModel{

    public Get( String url ) {

        this.url  = url;

        this.model = "get";
    }

    @Override
    public Get headers( Map<String,String> headers){
        for ( String s : headers.keySet ()) {
            this.headers.put ( s ,headers.get ( s ) );
        }
        return this;
    }
    @Override
    public Get header( String key , String value ){
        this.headers.put( key , value );
        return this;
    }
    @Override
    public Get cookies( Map<String,String> cookies ){
        for (String s : cookies.keySet ()) {
            this.cookies.put ( s,cookies.get ( s ) );
        }
        return this;
    }
    @Override
    public Get cookie( String key , String value ){
        this.cookies.put( key , value );
        return this;
    }
    @Override
    Get body(String body) {
        return null;
    }

    @Override
    public Get parameter(String key, String value) {
        this.parameters.put ( key,value );
        return this;
    }

    @Override
    public Get parameters(Map <String, String> parameters) {
        for (String s : parameters.keySet ()) {
            this.parameters.put ( s , parameters.get ( s ) );
        }
        return this;
    }

}
